package Employee1;

//定义一个测试类
public class Test{
    public static void main(String[] args){
        //声明一个Employee类型的数组，并创建不同子类型的对象
        Employee[] employee = {new SalariedEmployee("张三",1,6000),new HourlyEmployee("李四",2,50,180),new SalesEmployee("王五",3,6500,0.15),new BasePlusSalesEmployee("赵六",4,5000,0.15,2000)};
        //打印每个员工的工资
        for(int i = 0; i < employee.length ;i++)
            System.out.println(Math.round(employee[i].getSalary(10)));
    }
}
